<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="./layui/css/layui.css">
    <script src="./layui/layui.all.js"></script>
    <style>
        .layui-icon {
            font-size: 40px;
            color: red;
        }
    </style>
</head>


<body>
    <button id="btn">button</button>
    <div style="height: 400px;border:1px solid green">
        asfaddadfasdfafdafdaga
    </div>
    <script>
        var layer = layui.layer, $ = layui.jquery, laydate = layui.laydate
        var tt = '2020-5-19'
        var param = {};


        $('#btn').on('click', function () {

        })
        // setParentIframeHeight('myFrame')
        function setParentIframeHeight(id) {
            try {
                var parentIframe = parent.document.getElementById(id);
                if (window.attachEvent) {
                    window.attachEvent("onload", function () {
                        parentIframe.height = document.documentElement.scrollHeight;
                    });
                    return;
                } else {
                    window.onload = function () {
                        parentIframe.height = document.body.scrollHeight;
                    };
                    return;
                }
            } catch (e) {
                throw new Error('setParentIframeHeight Error');
            }
        }
        console.log($("body").height());
        console.log($);
        $.get('http://127.0.0.1:7300/mock/610530455022b00b38811baa/example/mock#!method=get', function (res) {
            console.log(99, res);
        })

    </script>

</body>

</html>